package com.xmtlxx.web.controller.tms.service;

import com.xmtlxx.common.core.domain.PageQuery;
import com.xmtlxx.common.core.page.TableDataInfo;
import com.xmtlxx.tms.domain.Waybill;
import com.xmtlxx.tms.domain.bo.WaybillBo;
import com.xmtlxx.tms.domain.vo.WaybillVo;

import java.util.Collection;
import java.util.List;

/**
 * 运单Service接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface IWaybillService {

    /**
     * 查询运单
     *
     * @param id 运单主键
     * @return 运单
     */
    WaybillVo queryById(String id);

    WaybillVo queryByOrderId(String id);

    /**
     * 查询运单列表
     *
     * @param bo 运单
     * @return 运单集合
     */
    TableDataInfo<WaybillVo> queryPageList(WaybillBo bo, PageQuery pageQuery);

    String getTaskVideoStatus(String id);

    /**
     * 查询运单列表
     *
     * @param bo 运单
     * @return 运单集合
     */
    List<WaybillVo> queryList(WaybillBo bo);

    /**
     * 修改运单
     *
     * @param bo 运单
     * @return 结果
     */
    WaybillVo insertByBo(WaybillBo bo);

    /**
     * 修改运单
     *
     * @param bo 运单
     * @return 结果
     */
    WaybillVo updateByBo(WaybillBo bo);

    WaybillVo updateBySignBo(WaybillBo bo);

    WaybillVo updateWaybillByBo(WaybillBo bo);

    WaybillVo dispatchWaybillByBo(WaybillBo bo);

    WaybillVo resetDispatch(WaybillBo bo);

    WaybillVo updateWaybillByCarBo(WaybillBo bo);

    /**
     * 校验并批量删除运单信息
     *
     * @param ids 需要删除的运单主键集合
     * @param isValid 是否校验,true-删除前校验,false-不校验
     * @return 结果
     */
    Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid);

    Boolean updateWithValidByIds(Collection<Waybill> waybills, Boolean isValid);

    List<WaybillVo> waybillStatistics();

    void updateWayBillByVo(WaybillVo vo);

    String getSignByWaybill(String boxNo,String status);
}
